package com.skypan.myapplication.http;

import com.google.gson.Gson;
import com.skypan.myapplication.bean.LoginR;
import com.skypan.myapplication.bean.WriteR;
import com.zhy.http.okhttp.callback.Callback;

import java.io.IOException;

import okhttp3.Response;

public abstract class WriteCallback extends Callback<WriteR>
{
    @Override
    public WriteR parseNetworkResponse(Response response, int id) throws IOException
    {
        String string = response.body().string();
        WriteR product = new Gson().fromJson(string, WriteR.class);
        return product;
    }
}